<?php

class newsBlockWidgetComponents extends myComponents{

    public function executeRender(){
		$this->node = $this->getRoute()->getObject();

		$q = NewItemTable::getStructureNewsByIdQuery($this->getRoute()->getObject());
		$q->andWhere('ni.picture != ""')
				->orderBy('ni.pri desc');
		NewItemTable::commonActivityConstraints($q);



		$this->news = NewItemTable::normalizeAssociatedNews($q);
		if($this->news)
			$this->news = $this->news[0]['news'];
		
    }

}